package io.homework3;

public class Student {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if (age>100||age<0){
            throw new RuntimeException("年龄异常");
        }
        this.age = age;
    }

    public Student(int age) {
        if (age>100||age<0){
            throw new RuntimeException("年龄异常");
        }
        this.age = age;
    }

    public Student() {
    }
}
